import { http, toast } from '@/uni_modules/uview-plus';
// 获取学校列表
export const getSchoolList = (params, config = {}) =>
	http.get(`/wx/school/list`, {
		params,
		...config
	});
// 获取token
export const getUser = (params, config = {}) =>
	http.get(`/wx/test/get-user/1`, {
		params,
		...config
	});
// 首页轮播图
export const getBanner = (params, config = {}) =>
	http.get(`/wx/ad/ad1`, {
		params,
		...config
	});
// 首页添加墙墙
export const getAdList = (params, config = {}) =>
	http.get(`/wx/ad/ad2`, {
		params,
		...config
	});
// 今日热帖
export const hotPost = (params, config = {}) =>
	http.get(`/wx/forum/hot-thread`, {
		params,
		...config
	});
// 主题分类
export const plateList = (params, config = {}) =>
	http.get(`/wx/forum/plate`, {
		params,
		...config
	});
// 获取置顶帖子列表
export const topThread = (params, config = {}) =>
	http.get(`/wx/forum/top-thread`, {
		params,
		...config
	});
// 获取帖子列表
export const threadList = (params, config = {}) =>
	http.get(`/wx/forum/thread`, {
		params,
		...config
	});
// 获取帖子详情
export const threadInfo = (threadId, params, config = {}) =>
	http.get(`/wx/forum/thread/${threadId}`, {
		params,
		...config
	});
// 点赞帖子
export const likePost = (threadId, params, config = {}) =>
	http.post(`/wx/forum/thread/like/${threadId}`, params, {
		...config
	});
// 获取主题评论数量
export const postCount = (threadId, params, config = {}) =>
	http.get(`/wx/forum/thread/post-count/${threadId}`, {
		params,
		...config
	});
// 获取评论列表
export const remarkList = (threadId, params, config = {}) =>
	http.get(`/wx/forum/thread/post/${threadId}`, {
		params,
		...config
	});
// 查看更多评论
export const replyItem = (threadId, params, config = {}) =>
	http.get(`/wx/forum/thread/post/reply/${threadId}`, {
		params,
		...config
	});
// 发送评论
export const postMsgAdd = (data, config = {}) =>
	http.post(`/wx/forum/thread/post/add`, data, {
		...config
	});
// 评论点赞
export const postMsgLike = (ID, data, config = {}) =>
	http.post(`/wx/forum/thread/post/like/${ID}`, data, {
		...config
	});
// 获取用户马甲
export const userVest = (params, config = {}) =>
	http.get(`/wx/admin/user-vest`, {
		params,
		...config
	});
// 帖子插眼
export const watchPost = (threadId, params, config = {}) =>
	http.post(`/wx/forum/thread/watch/${threadId}`, params, {
		...config
	});
// 获取置顶规则
export const topRule = (params, config = {}) =>
	http.get(`/wx/forum/thread/top-rule`, {
		params,
		...config
	});
// 选择置顶时间
export const topSupport = (threadId, params, config = {}) =>
	http.post(`/wx/forum/thread/top-support/${threadId}`, params, {
		...config
	});
// 发帖
export const threadAdd = (data, config = {}) =>
	http.post(`/wx/forum/thread/add`, data, {
		...config
	});
// 获取当前用户的个人信息
export const getUserInfo = (params, config = {}) =>
	http.get(`/wx/user/info`, {
		params,
		...config
	});
// 搜索帖子列表
export const getThreadSearch = (params, config = {}) =>
	http.get(`/wx/forum/thread-search`, {
		params,
		...config
	});
// 获取消息
export const getMessage = (params, config = {}) =>
	http.get(`/wx/user/message/last-7-days`, {
		params,
		...config
	});
// 回复我的
export const getMesReply = (params, config = {}) =>
	http.get(`/wx/user/message/reply`, {
		params,
		...config
	});
// 插眼消息
export const getMesWatch = (params, config = {}) =>
	http.get(`/wx/user/message/watch`, {
		params,
		...config
	});
// 收到的赞
export const getMesLike = (params, config = {}) =>
	http.get(`/wx/user/message/like`, {
		params,
		...config
	});
// 系统通知
export const getMesSys = (params, config = {}) =>
	http.get(`/wx/user/message/system`, {
		params,
		...config
	});
// 我点赞的帖子
export const userLikePost = (params, config = {}) =>
	http.get(`/wx/user/like/thread`, {
		params,
		...config
	});
// 我点赞的帖子
export const userLikeRemark = (params, config = {}) =>
	http.get(`/wx/user/like/thread/post`, {
		params,
		...config
	});
// 我的帖子
export const userPost = (params, config = {}) =>
	http.get(`/wx/user/thread`, {
		params,
		...config
	});
// 我回复
export const userRemark = (params, config = {}) =>
	http.get(`/wx/user/thread/post`, {
		params,
		...config
	});
// 插眼帖子
export const userWatch = (params, config = {}) =>
	http.get(`/wx/user/watch/thread`, {
		params,
		...config
	});
// 获取验证码
export const codeSend = (data, config = {}) =>
	http.post(`/wx/code/send`, data, {
		...config
	});
// 身份认证
export const idApply = (data, config = {}) =>
	http.post(`/wx/user/identity/apply`, data, {
		...config
	});
// 获取身份认证信息
export const identityAxios = (params, config = {}) =>
	http.get(`/wx/user/identity`, {
		params,
		...config
	});
// 修改性别
export const updateSex = (data, config = {}) =>
	http.post(`/wx/user/update/sex`, data, {
		...config
	});
// 修改昵称
export const updateNickname = (data, config = {}) =>
	http.post(`/wx/user/update/nickname`, data, {
		...config
	});
// 用户注销
export const logoff = (data, config = {}) =>
	http.post(`/wx/user/logoff`, data, {
		...config
	});
// 举报帖子
export const report = (threadId, data, config = {}) =>
	http.post(`/wx/forum/thread/report/${threadId}`, data, {
		...config
	});
// 举报评论
export const reportRemark = (id, data, config = {}) =>
	http.post(`/wx/forum/thread/post/report/${id}`, data, {
		...config
	});
// 删除该帖
export const deletePost = (id, data, config = {}) =>
	http.post(`/wx/forum/thread/delete/${id}`, data, {
		...config
	});
// 删除该评论
export const deleteRemark = (id, data, config = {}) =>
	http.post(`/wx/forum/thread/post/delete/${id}`, data, {
		...config
	});
// 结束帖子
export const endPost = (id, data, config = {}) =>
	http.post(`/wx/forum/thread/end-post/${id}`, data, {
		...config
	});
// 关闭评论推送
export const offRemark = (id, data, config = {}) =>
	http.post(`/wx/forum/thread/close-comment-push/${id}`, data, {
		...config
	});
// 帖子置顶
export const postGoTop = (id, data, config = {}) =>
	http.post(`/wx/admin/forum/thread/set-or-unset-top/${id}`, data, {
		...config
	});
// 加精或取消加精
export const setSelected = (id, data, config = {}) =>
	http.post(`/wx/admin/forum/thread/set-or-unset-digest/${id}`, data, {
		...config
	});
// 设置为火帖
export const setOrUnsetHot = (id, data, config = {}) =>
	http.post(`/wx/admin/forum/thread/set-or-unset-hot/${id}`, data, {
		...config
	});
// 用户风险等级设置
export const userRisk = (id, data, config = {}) =>
	http.post(`/wx/admin/member/update/user-risk/${id}`, data, {
		...config
	});
// 禁言用户
export const userBan = (id, data, config = {}) =>
	http.post(`/wx/admin/member/ban/${id}`, data, {
		...config
	});
// 获取会员信息
export const memberId = (id, params, config = {}) =>
	http.get(`/wx/admin/member/${id}`, {
		params,
		...config
	});
// 更新用户提现状态
export const cashType = (id, data, config = {}) =>
	http.post(`/wx/admin/member/update-user-withdrawal-status/${id}`, data, {
		...config
	});
// 修改用户昵称
export const changeNickname = (id, data, config = {}) =>
	http.post(`/wx/admin/member/update/nickname/${id}`, data, {
		...config
	});
// 获取学校信息
export const getSchoolInfo = (id, params, config = {}) =>
	http.get(`/wx/school/info/${id}`, {
		params,
		...config
	});
// 获取消息的评论内容
export const getMessageInfo = (id, params, config = {}) =>
	http.get(`/wx/forum/thread/post/message/${id}`, {
		params,
		...config
	});
// 判断是否有未读消息
export const getMessageTip = (params, config = {}) =>
	http.get(`/wx/user/message/unread-count`, {
		params,
		...config
	});
// 设置消息已读
export const clearMessagePoint = (data, config = {}) =>
	http.post(`/wx/user/message/clear-unread`, data, {
		...config
	});
// 获删除的帖子
export const getDelPost = (params, config = {}) =>
	http.get(`/wx/user/deleted/thread`, {
		params,
		...config
	});
// 获删除的评论
export const getDelRemark = (params, config = {}) =>
	http.get(`/wx/user/deleted/thread/post`, {
		params,
		...config
	});
// 待审核数量统计
export const getAuditCount = (id, params, config = {}) =>
	http.get(`/wx/admin/audit-count/${id}`, {
		params,
		...config
	});
// 获取会员列表
export const getMember = (params, config = {}) =>
	http.get(`/wx/admin/member`, {
		params,
		...config
	});
// 删除马甲
export const deleteUserVest = (id, data, config = {}) =>
	http.post(`/wx/admin/user-vest/delete/${id}`, data, {
		...config
	});
// 新增马甲
export const addVest = (data, config = {}) =>
	http.post(`/wx/admin/user-vest/add`, data, {
		...config
	});
// 获取学校轮播图
export const getSchoolCarouselImage = (id, params, config = {}) =>
	http.get(`/wx/admin/school/carousel-image/${id}`, {
		params,
		...config
	});
// 删除学校轮播图
export const deleteCarouselImage = (id, data, config = {}) =>
	http.post(`/wx/admin/school/carousel-image/delete/${id}`, data, {
		...config
	});
// 新增学校轮播图
export const addCarouselImage = (id, data, config = {}) =>
	http.post(`/wx/admin/school/carousel-image/add/${id}`, data, {
		...config
	});
// 获取学校广告墙
export const getSchoolAD = (id, params, config = {}) =>
	http.get(`/wx/admin/school/advertisement-wall/${id}`, {
		params,
		...config
	});
// 删除学校广告墙
export const deleteAdvertisementWall = (id, data, config = {}) =>
	http.post(`/wx/admin/school/advertisement-wall/delete/${id}`, data, {
		...config
	});
// 新增学校广告墙
export const addAdvertisementWall = (id, data, config = {}) =>
	http.post(`/wx/admin/school/advertisement-wall/add/${id}`, data, {
		...config
	});
// 获取学校微信群
export const getSchoolWechatGroup = (id, params, config = {}) =>
	http.get(`/wx/admin/school/wechat-group/get/${id}`, {
		params,
		...config
	});
// 删除学校微信群
export const deleteWechatGroup = (id, data, config = {}) =>
	http.post(`/wx/admin/school/wechat-group/delete/${id}`, data, {
		...config
	});
// 添加微信群
export const addWechatGroup = (id, data, config = {}) =>
	http.post(`/wx/admin/school/wechat-group/add/${id}`, data, {
		...config
	});
// 获取学校万人墙
export const getSchoolPeopleWall = (id, params, config = {}) =>
	http.get(`/wx/admin/school/people-wall/get/${id}`, {
		params,
		...config
	});
// 删除学校万人墙
export const deletePeopleWall = (id, data, config = {}) =>
	http.post(`/wx/admin/school/people-wall/delete/${id}`, data, {
		...config
	});
// 添加万人墙
export const addPeopleWallDialog = (id, data, config = {}) =>
	http.post(`/wx/admin/school/people-wall/add/${id}`, data, {
		...config
	});
// 获取主题分类列表
export const getSchoolForumPlateList = (id, params, config = {}) =>
	http.get(`/wx/admin/school/forum-plate/${id}`, {
		params,
		...config
	});
// 删除主题分类
export const deleteForumPlate = (id, data, config = {}) =>
	http.post(`/wx/admin/school/delete-forum-plate/${id}`, data, {
		...config
	});
// 添加主题分类
export const addForumPlate = (id, data, config = {}) =>
	http.post(`/wx/admin/school/add-forum-plate/${id}`, data, {
		...config
	});
// 添加广告
export const addAdvertisement2 = (id, data, config = {}) =>
	http.post(`/wx/admin/school/advertisement-add/${id}`, data, {
		...config
	});
// 获取广告列表
export const getAdList2 = (id, params, config = {}) =>
	http.get(`/wx/admin/school/advertisement-list/${id}`, {
		params,
		...config
	});
// 获取广告详情
export const getAdInfo = (id, params, config = {}) =>
	http.get(`/wx/admin/school/advertisement-detail/${id}`, {
		params,
		...config
	});
// 删除广告
export const delAd = (id, data, config = {}) =>
	http.post(`/wx/admin/school/advertisement-delete/${id}`, data, {
		...config
	});
// 社区总指标
export const totalPpaper = (id, params, config = {}) =>
	http.get(`/wx/admin/website/total-paper`, {
		params,
		...config
	});
// 今日日报
export const todayPaper = (id, params, config = {}) =>
	http.get(`/wx/admin/website/today-paper`, {
		params,
		...config
	});
// 每日日报
export const dayPaper = (params, config = {}) =>
	http.get(`/wx/admin/website/day-paper`, {
		params,
		...config
	});
// 每月日报
export const monthPaper = (params, config = {}) =>
	http.get(`/wx/admin/website/month-paper`, {
		params,
		...config
	});
// 查询学校风险词列表
export const riskWords = (id, params, config = {}) =>
	http.get(`/wx/admin/school/risk-words/${id}`, {
		params,
		...config
	});
// 删除学校风险词
export const delRisk = (id, data, config = {}) =>
	http.post(`/wx/admin/school/delete-risk-words/${id}`, data, {
		...config
	});
// 新增风险词
export const addRisk = (id, data, config = {}) =>
	http.post(`/wx/admin/school/add-risk-words/${id}`, data, {
		...config
	});
// 用户实名审核列表
export const userIdentity = (id, params, config = {}) =>
	http.get(`/wx/admin/audit/user-identity/${id}`, {
		params,
		...config
	});
// 用户实名审核通过/驳回
export const approvedSubmit = (id, data, config = {}) =>
	http.post(`/wx/admin/audit/user-identity/${id}`, data, {
		...config
	});
// 获取帖子审核列表
export const auditThread = (id, params, config = {}) =>
	http.get(`/wx/admin/audit/thread/${id}`, {
		params,
		...config
	});
// 审核该帖通过
export const setThreadAudit = (id, data, config = {}) =>
	http.post(`/wx/admin/thread/audit/${id}`, data, {
		...config
	});
// 评论审核列表
export const auditRemark = (id, params, config = {}) =>
	http.get(`/wx/admin/audit/thread/post/${id}`, {
		params,
		...config
	});
// 提现设置
export const getWithdrawalSetting = (id, params, config = {}) =>
	http.get(`/wx/admin/withdrawal-setting/${id}`, {
		params,
		...config
	});
// 提现设置
export const setMiniWithdrawalAmount = (id, data, config = {}) =>
	http.post(`/wx/admin/update/withdrawal-setting/${id}`, data, {
		...config
	});
// 获取学校
export const getSchoolList2 = (id, params, config = {}) =>
	http.get(`/wx/admin/school`, {
		params,
		...config
	});
// 社区实名
export const switchIsNeedIdentity = (id, data, config = {}) =>
	http.post(`/wx/admin/school/posting-identity/${id}`, data, {
		...config
	});
// 修改火帖阈值
export const changeThresholdForHotThreads = (id, data, config = {}) =>
	http.post(`/wx/admin/school/thread-hot-threshold/${id}`, data, {
		...config
	});
// 修改佣金分成比例
export const changeRunErrandsCommissionSharing = (id, data, config = {}) =>
	http.post(`/wx/admin/school/run-errands-commission-sharing/${id}`, data, {
		...config
	});
// 获取站长列表
export const getStationmasterList = (id, params, config = {}) =>
	http.get(`/wx/admin/school/stationmaster/${id}`, {
		params,
		...config
	});
// 添加站长
export const chooseUser = (id, data, config = {}) =>
	http.post(`/wx/admin/school/add-stationmaster/${id}`, data, {
		...config
	});
// 删除站长
export const deleteStationmaster = (id, data, config = {}) =>
	http.post(`/wx/admin/school/delete-stationmaster/${id}`, data, {
		...config
	});
// 获取举报的帖子
export const getAuditPostList = (id, params, config = {}) =>
	http.get(`/wx/admin/audit/thread/report/${id}`, {
		params,
		...config
	});
// 举报删除该帖
export const deleteAuditPost = (id, data, config = {}) =>
	http.post(`/wx/admin/audit/thread/report/thread-delete/${id}`, data, {
		...config
	});
// 忽略该举报
export const doIgnoreReport = (id, data, config = {}) =>
	http.post(`/wx/admin/audit/thread/report/ignore/${id}`, data, {
		...config
	});
// 获取举报的评论
export const getAuditReportList = (id, params, config = {}) =>
	http.get(`/wx/admin/audit/thread/post/report/${id}`, {
		params,
		...config
	});
// 忽略该举报
export const doIgnoreReport2 = (id, data, config = {}) =>
	http.post(`/wx/admin/audit/thread/post/report/ignore/${id}`, data, {
		...config
	});
// 举报删除该帖
export const deleteAuditRemark = (id, data, config = {}) =>
	http.post(`/wx/admin/audit/thread/post/report/thread-post-delete/${id}`, data, {
		...config
	});
// 创建学校
export const addSchool = (data, config = {}) =>
	http.post(`/wx/admin/add-school`, data, {
		...config
	});
// 获取跑腿列表
export const getErrandsList = (params, config = {}) =>
	http.get(`/wx/run-errands/order`, {
		params,
		...config
	});
// 接单
export const receivingOrder = (id, data, config = {}) =>
	http.post(`/wx/run-errands/receiving-order/${id}`, data, {
		...config
	});
// 跑腿查询订单详情
export const getOrderInfo = (id, params, config = {}) =>
	http.get(`/wx/run-errands/order/${id}`, {
		params,
		...config
	});
// 退回订单
export const returnOrder = (id, data, config = {}) =>
	http.post(`/wx/admin/run-errands/return-order/${id}`, data, {
		...config
	});
// 取消骑手接单
export const cancelOrderRecipient = (id, data, config = {}) =>
	http.post(`/wx/admin/run-errands/cancel-order-recipient/${id}`, data, {
		...config
	});
// 佣金退款发单人
export const commissionRefund = (id, data, config = {}) =>
	http.post(`/wx/admin/run-errands/commission-refund/${id}`, data, {
		...config
	});
// 佣金结算骑手
export const commissionSettlement = (id, data, config = {}) =>
	http.post(`/wx/admin/run-errands/commission-settlement/${id}`, data, {
		...config
	});
// 跑腿用户风险等级设置
export const errandsUserRisk = (id, data, config = {}) =>
	http.post(`/wx/admin/member/update/user-risk/${id}`, data, {
		...config
	});
// 更新发单人提现状态
export const updateSenderWithdrawalStatus = (id, data, config = {}) =>
	http.post(`/wx/admin/member/update-sender-withdrawal-status/${id}`, data, {
		...config
	});
// 变更骑手提现状态
export const updateRecipientWithdrawalStatus = (id, data, config = {}) =>
	http.post(`/wx/admin/member/update-recipient-withdrawal-status/${id}`, data, {
		...config
	});
// 取消订单
export const senderCancelOrder1 = (id, data, config = {}) =>
	http.post(`/wx/run-errands/sender-cancel-order/${id}`, data, {
		...config
	});
// 接单人确认完成订单
export const recipientConfirmCompletion = (id, data, config = {}) =>
	http.post(`/wx/run-errands/recipient-confirm-completion/${id}`, data, {
		...config
	});
// 发单人提交异议
export const senderRaiseObjectionsSubmit = (id, data, config = {}) =>
	http.post(`/wx/run-errands/sender-raise-objection/${id}`, data, {
		...config
	});
// 发单人确认完成订单
export const senderConfirmCompletion = (id, data, config = {}) =>
	http.post(`/wx/run-errands/sender-confirm-completion/${id}`, data, {
		...config
	});
// 跑腿发布
export const postBountyMission = (data, config = {}) =>
	http.post(`/wx/run-errands/add-order`, data, {
		...config
	});
// 获取订单列表
export const getUserOrderList = (params, config = {}) =>
	http.get(`/wx/user/order/list`, {
		params,
		...config
	});
// 统计网站pv和uv
export const statisticsWebsitePVandUV = (data, config = {}) =>
	http.post(`/wx/website/pv-uv`, data, {
		...config
	});
// 前端获取微信授权链接，微信授权登录
export const authorizedLogin = (params, config = {}) =>
	http.get(`/wx/authorized-login`, {
		params,
		...config
	});
// 获取当前用户的用户收入
export const getUserRevenue = (params, config = {}) =>
	http.get(`/wx/user/revenue`, {
		params,
		...config
	});
// 获取账单明细
export const getUserBill = (params, config = {}) =>
	http.get(`/wx/user/bill`, {
		params,
		...config
	});
// 获取提现记录
export const getUserRecord = (params, config = {}) =>
	http.get(`/wx/user/withdrawal/record`, {
		params,
		...config
	});
